package org.jspar.model;


public class Direction {
	
	public static final int OUT_VALUE    = 0;
	public static final int IN_VALUE       = 1;
	public static final int INOUT_VALUE = 2;
	public static final int OUTIN_VALUE = 3;
	public static final int NONE_VALUE  = 4;
	public static final int GND_VALUE    = 5;
	public static final int VDD_VALUE    = 6;
	
	public static final Direction OUT    = new Direction("OUT", OUT_VALUE);
	public static final Direction IN       = new Direction("IN", IN_VALUE);
	public static final Direction INOUT = new Direction("INOUT", INOUT_VALUE);
	public static final Direction OUTIN = new Direction("OUTIN", OUTIN_VALUE);
	public static final Direction NONE  = new Direction("NONE", NONE_VALUE);
	public static final Direction GND    = new Direction("GND", GND_VALUE);
	public static final Direction VDD    = new Direction("VDD", VDD_VALUE);
	
	private String name;
	private int value;
	
	private Direction(String name, int value) {
		this.name = name;
		this.value = value;
	}
	
	public int value() {
		return value;
	}
	
	public String toString() {
		return name;
	}

}
